package io.gitee.archx.sc.web.controller;

import io.gitee.archx.sc.data.client.HiFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * HiController
 *
 * @author Archx[archx@foxmail.com]
 * at 2018/7/24 23:34
 */
@RestController
@RequestMapping("/hi")
@Slf4j
public class HiController {

    @Autowired
    private HiFeignClient feignClient;

    @GetMapping("/{name}")
    public String hi(@PathVariable("name") String name) {
        log.info("request name: {}", name);
        return feignClient.hi(name);
    }
}
